<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'batchAccount.label', default: 'BatchAccount')}"/>
    <title>添加评估机构</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>添加评估机构</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                添加评估机构
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                添加评估机构
            </div>

            <div class="panel-body form-horizontal">
                <g:form action="save">
                    <g:if test="${flash.message}">
                        <div class="message alert alert-info" role="status">${flash.message}</div>
                    </g:if>
                    <g:hasErrors bean="${this.batchAccount}">
                        <ul class="errors" role="alert">
                            <g:eachError bean="${this.batchAccount}" var="error">
                                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                                        error="${error}"/></li>
                            </g:eachError>
                        </ul>
                    </g:hasErrors>

                    <g:textField class="form-control hidden" type="text" name="targetUri" id="targetUri" value="${params.targetUri}"/>
                    <g:textField name="batch" id="batch" value="${this.batchAccount?.batch?.id}" class="hidden"/>

                    <div class="form-group">
                        <label class="col-md-2 control-label is-required">评估机构</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="account" id="account" optionKey="id" optionValue="name" from="${com.cindata.Account.findAllByTypeAndStatus(com.cindata.dictionary.AccountTypeDict.findByCode('EvaluateAccount'), 1)}"
                                value="${batchAccount?.account}" noSelection="${['': '请选择评估机构']}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="save" value="保存"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
